package com.sojson.config.autoConfig.close.springsecurity;

import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.autoconfigure.security.servlet.SecurityAutoConfiguration;
import org.springframework.boot.autoconfigure.security.servlet.SecurityFilterAutoConfiguration;
import org.springframework.context.annotation.Conditional;
import org.springframework.context.annotation.Configuration;

import com.sojson.config.autoConfig.close.springsecurity.condition.CloseSpringSecurityCondittion;

/**
 * 关闭SpringSecurity的自动配置
 */
@Configuration
/** 是否注入这个Bean */
@Conditional(CloseSpringSecurityCondittion.class)
/** EnableAutoConfiguration注解，关闭springBoot关于SpringSecurity的一些自动注入 */
@EnableAutoConfiguration(exclude = {SecurityAutoConfiguration.class, SecurityFilterAutoConfiguration.class},
    excludeName = "org.springframework.boot.actuate.autoconfigure.security.servlet.ManagementWebSecurityAutoConfiguration")
public class CloseSpringSecurityAutoConfig {

}